On this page

Skip to content

Setting Table Descriptions Using SQL Server Management Studio

Generally, to help others understand the purpose and structure of a table, we set descriptions for tables. This not only helps in documenting the database structure but also supports development tools in generating Table Schema documentation.

While column descriptions can be edited within the design view, table descriptions might not seem obvious at first glance. However, they can still be configured. Here is how to do it.

Setting via SSMS

  1. In SQL Server Management Studio (SSMS), right-click the target table and select "Properties".
  2. In the "Properties" window, go to the "Extended Properties" page, add a property named MS_Description, and enter the table description.

extended properties dialog

WARNING

Clicking the ellipsis (...) button next to the field will open a UI window for multi-line editing. If you are using Entity Framework reverse engineering, avoid using multi-line descriptions to prevent the generation of code that fails to compile.

2024-08-23

I suddenly discovered that the table description can be edited directly in the Properties window of the table designer, as shown in the image below. No wonder I remembered that setting table descriptions wasn't that complicated in the past...

table designer description property

Editing via SQL Syntax

You can set or modify table descriptions using the following SQL syntax:

Adding a Table Description

sql
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'{Table Description}', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'{Table Name}';

Modifying a Table Description

sql
EXECUTE sp_updateextendedproperty @name = N'MS_Description', @value = N'{Table Description}', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'{Table Name}';

Change Log

  • 2024-07-15 Initial version created.
  • 2024-08-23 Added the second method for SSMS configuration.